import ElementPlus from 'element-plus'
import 'element-plus/lib/theme-chalk/index.css'
import '@/assets/css/mine.less'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import axios from './http';
import common from '@/util/common';
import msg from '@/util/Message'
import mitt from "mitt"
// store
import store from './store'
//components
import vap from '@/components/commons/Va-p.vue'
import vaButton from '@/components/commons/Va-Button.vue'
import vaSelect from '@/components/commons/Va-Select.vue'
import vaRadio from '@/components/commons/Va-Radio.vue'
import vaText from '@/components/commons/Va-Text.vue'
import vaPopover from '@/components/commons/Va-Popover.vue'
import VaIconSelect from '@/components/commons/Va-IconSelect.vue'
import VaCascader from '@/components/commons/Va-Cascader.vue'
import VaLoad from '@/components/commons/Va-Load.vue'

import ZhLocale from 'element-plus/lib/locale/lang/zh-cn'; // 中文
const app = createApp(App)
//全局挂载
app.config.globalProperties.$axios = axios
app.config.globalProperties.$msg = msg
app.config.globalProperties.$bus = new mitt()
app.config.globalProperties.$common = common
app.use(router)
app.use(store)
app.use(ElementPlus,{ ZhLocale })
app.component("va-p",vap)
app.component("va-button",vaButton)
app.component("va-select",vaSelect)
app.component("va-radio",vaRadio)
app.component("va-text",vaText)
app.component("va-popover",vaPopover)
app.component("va-iconSelect",VaIconSelect)
app.component("va-cascader",VaCascader)
app.component("va-load",VaLoad)
app.mount('#app')

